1 Write a query to display the orderid order date customer l

1. Write a query to display the orderid, order date, customer last name and firstname for all orders that have not shipped.

Question 2. Write a query using JOINS to list the orderid, orderdate, customer last name, customer first name for any orders made with a sales rep with the last name of JONES (use all caps).

\"1.
      

Solution

1.

SELECT O.OrderID, O.OrderDate, C.LastName, C.FirstName

FROM Order O, Customer C

WHERE O.CustomerID = C.CustomerID

AND O.ShipDate is NULL;

2.

SELECT O.OrderID, O.OrderDate, C.LastName, C.FirstName

FROM Order O, Customer C, SalesRep S

WHERE C.CustomerID = O.CustomerID

AND S.RepID = C.RepID

AND S.LastName = \'JONES\';

3.

SELECT CAST(AVG(retail)) AS DECIMAL(10, 2))

FROM Part;

1. Write a query to display the orderid, order date, customer last name and firstname for all orders that have not shipped. Question 2. Write a query using JOIN
1. Write a query to display the orderid, order date, customer last name and firstname for all orders that have not shipped. Question 2. Write a query using JOIN

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site